package com.ruoyi.movie.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.movie.mapper.MoviePvMapper;
import com.ruoyi.movie.domain.MoviePv;
import com.ruoyi.movie.service.IMoviePvService;

/**
 * 影视访问量Service业务层处理
 *
 * @author ruoyi
 * @date 2025-10-28
 */
@Service
public class MoviePvServiceImpl implements IMoviePvService
{
    @Autowired
    private MoviePvMapper moviePvMapper;

    /**
     * 查询影视访问量
     *
     * @param moviePvId 影视访问量主键
     * @return 影视访问量
     */
    @Override
    public MoviePv selectMoviePvById(Integer moviePvId)
    {
        return moviePvMapper.selectMoviePvById(moviePvId);
    }

    /**
     * 根据影视ID查询访问量
     *
     * @param movieBasicId 影视基础ID
     * @return 影视访问量
     */
    @Override
    public MoviePv selectMoviePvByMovieBasicId(Integer movieBasicId)
    {
        return moviePvMapper.selectMoviePvByMovieBasicId(movieBasicId);
    }

    /**
     * 查询影视访问量列表
     *
     * @param moviePv 影视访问量
     * @return 影视访问量
     */
    @Override
    public List<MoviePv> selectMoviePvList(MoviePv moviePv)
    {
        return moviePvMapper.selectMoviePvList(moviePv);
    }

    /**
     * 新增影视访问量
     *
     * @param moviePv 影视访问量
     * @return 结果
     */
    @Override
    public int insertMoviePv(MoviePv moviePv)
    {
        return moviePvMapper.insertMoviePv(moviePv);
    }

    /**
     * 修改影视访问量
     *
     * @param moviePv 影视访问量
     * @return 结果
     */
    @Override
    public int updateMoviePv(MoviePv moviePv)
    {
        return moviePvMapper.updateMoviePv(moviePv);
    }

    /**
     * 增加访问量
     *
     * @param movieBasicId 影视基础ID
     * @return 结果
     */
    @Override
    public int increaseMoviePv(Integer movieBasicId)
    {
        return moviePvMapper.increaseMoviePv(movieBasicId);
    }

    /**
     * 批量删除影视访问量
     *
     * @param moviePvIds 需要删除的影视访问量主键
     * @return 结果
     */
    @Override
    public int deleteMoviePvByIds(Integer[] moviePvIds)
    {
        return moviePvMapper.deleteMoviePvByIds(moviePvIds);
    }

    /**
     * 删除影视访问量信息
     *
     * @param moviePvId 影视访问量主键
     * @return 结果
     */
    @Override
    public int deleteMoviePvById(Integer moviePvId)
    {
        return moviePvMapper.deleteMoviePvById(moviePvId);
    }

    /**
     * 根据影视ID删除访问量
     *
     * @param movieBasicId 影视基础ID
     * @return 结果
     */
    @Override
    public int deleteMoviePvByMovieBasicId(Integer movieBasicId)
    {
        return moviePvMapper.deleteMoviePvByMovieBasicId(movieBasicId);
    }
}
